From: Keir Fraser Date: Fri, 6 Mar 2009 18:56:28 +0000 (+0000) Subject: xm-test: Identifying the network env specified in xend config fails, X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13994^2~23 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=7468faf8d3780f4bc4789703f4bd8d7466438f98;p=xen.git xm-test: Identifying the network env specified in xend config fails, if an additional parameter is given for the network-bridge (e.g. netdev=eth1) The patch splits the network command into the command name and its parameters to determine the netenv (bridge, route, nat) Signed-off-by: juergen.gross@fujitsu-siemens.com --- diff --git a/tools/xm-test/lib/XmTestLib/NetConfig.py b/tools/xm-test/lib/XmTestLib/NetConfig.py index 0c39969806..857a9a5cca 100644 --- a/tools/xm-test/lib/XmTestLib/NetConfig.py +++ b/tools/xm-test/lib/XmTestLib/NetConfig.py @@ -57,11 +57,13 @@ def getXendNetConfig(): while val[0] != 'network-script': val = pin.get_val() - if val[1] == "network-bridge": + # split network command into script name and its parameters + sub_val = val[1].split() + if sub_val[0] == "network-bridge": netenv = "bridge" - elif val[1] == "network-route": + elif sub_val[0] == "network-route": netenv = "route" - elif val[1] == "network-nat": + elif sub_val[0] == "network-nat": netenv = "nat" else: raise NetworkError("Failed to get network env from xend config")